var bg1 = document.querySelector(".class1")
var bg2 = document.querySelector(".class2")
var bg3 = document.querySelector(".class3")
var bg4 = document.querySelector(".class4")
var bg5 = document.querySelector(".class5")
var bg6 = document.querySelector(".class6")
var cw = document.querySelectorAll(".cw")
var a = document.querySelectorAll("a")
var xi = document.querySelector(".xim")
var cp = document.querySelector(".h-left")

//if(cp.style.color= "#fff"){
//	cp.addEventListener("click",function(){
//		cp.style.color= "#000";
//	})
//}else{
//	cp.addEventListener("click",function(){
//		cp.style.color= "#fff";
//	})
//}
bg1.addEventListener("click",function(){
	for(var i=0; i<cw.length;i++){
		cw[i].style.background= "red";
		xi.style.opacity= "1";
		cw[i].style.opacity= "1";
		cp.style.color= "red";
		cp.style.opacity= "1";
		for(var j=0;j<a.length;j++){
			a[j].style.opacity= "1"
		}
	}
})
bg2.addEventListener("click",function(){
	for(var i=0; i<cw.length;i++){
		cw[i].style.background= "green";
		xi.style.opacity= "1";
		cw[i].style.opacity= "1";
		cp.style.color= "green";
		cp.style.opacity= "1";
		for(var j=0;j<a.length;j++){
			a[j].style.opacity= "1"
		}
	}
})
bg3.addEventListener("click",function(){
	for(var i=0; i<cw.length;i++){
		cw[i].style.background= "blue";
		xi.style.opacity= "1";
		cw[i].style.opacity= "1";
		cp.style.color= "blue";
		cp.style.opacity= "1";
		for(var j=0;j<a.length;j++){
			a[j].style.opacity= "1"
		}
	}
})
bg4.addEventListener("click",function(){
	for(var i=0; i<cw.length;i++){
		cw[i].style.background= "#000";
		xi.style.opacity= "1";
		cp.style.color= "#000";
		cw[i].style.opacity= "1";
		cp.style.opacity= "1";
		for(var j=0;j<a.length;j++){
			a[j].style.opacity= "1"
		}
	}
})
bg5.addEventListener("click",function(){
	for(var i=0; i<cw.length;i++){
		cw[i].style.background= "#fff";
		xi.style.opacity= "1";
		cw[i].style.opacity= "1";
		cp.style.color= "#fff";
		cp.style.opacity= "1";
		for(var j=0;j<a.length;j++){
			a[j].style.opacity= "1"
		}
	}
})
bg6.addEventListener("click",function(){
	for(var i=0; i<cw.length;i++){
		cw[i].style.background= "#ccc";
		xi.style.opacity= "0";
		cw[i].style.opacity= "0";
		cp.style.color= "#ccc";
		cp.style.opacity= "0";
		for(var j=0;j<a.length;j++){
			a[j].style.opacity= "0"
		}
	}
})


/*
var yazhou = "shabi";
if(yazhou=="shabi"){
	alert("我爱你")
}else{
	alert("123")
}*/
var zh3 = document.querySelector(".zh3");
var zh4 = document.querySelector(".zh4");
var zh1 = document.querySelector(".zh1");
var zh2 = document.querySelector(".zh2");

zh3.addEventListener("click",function(){
	zh2.value=zh1.value.toUpperCase();
})
zh4.addEventListener("click",function(){
	zh2.value=zh1.value.toLowerCase();
})



console.log("已自动获取您的屏幕高度为：" + window.screen.height + "px,屏幕宽度为：" + window.screen.width + "px.");
console.log(window.innerHeight);
console.log(window.innerWidth);



var dk = document.querySelector(".dk");

dk.addEventListener("click",function(){
	open("http://www.baidu.com");
})


console.log(location.pathname);
console.log(location.href);
console.log(location);

function a(){
	history.forward();
}

function b(){
	history.back();
}


//navigator.userAgent.indexOf("Chrome") > -1;

/*var tet= navigator.userAgent;

console.log(tet);
if(tet.indexOf('Chrome') != -1){
	alert("这是谷歌浏览器");
}else if(tet.indexOf('Firefox') != -1){
	alert("这是火狐浏览器");
}


*/

setInterval(function(){
//	alert("弹窗蹦迪");
//	open("http://www.baidu.com");
	
},100)




alert("小玖窥屏中......")